#include "FAobject.h"

/* FAcharacters */
FAcharacters::FAcharacters()
{
	this->name = "";
	this->Hp = NULL;
	this->St = NULL;
	this->Att = NULL;
	this->Def = NULL;
	this->speed = 0;
	XY->SetXY(0, 0);
}

FAcharacters::FAcharacters(string Chname, unsigned int HealthPoint,unsigned int Stamina, unsigned int Attack, unsigned int Defend, double speed, FApoint *Pt)
{
	this->name = Chname;
	this->Hp = HealthPoint;
	this->St = Stamina;
	this->Att = Attack;
	this->Def = Defend;
	XY = Pt;
}

void FAcharacters::SetCoordinate(FApoint *pt)
{
	this->XY = pt;
}

void FAcharacters::SetCoordinate(double X, double Y)
{
	this->XY->SetXY(X, Y);
}

void FAcharacters::SetStatus(unsigned int HP, unsigned int MP, unsigned int attack, unsigned int Defense)
{
	this->Hp = HP;
	this->St = MP;
	this->Att = attack;
	this->Def = Defense;
}

void FAcharacters::SetSpeed(double sp)
{
	this->speed = sp;
}

string FAcharacters::Name()
{
	return this->name;
}

unsigned int FAcharacters::Attack()
{
	return this->Att;
}

unsigned int FAcharacters::Defense()
{
	return this->Def;
}

unsigned int FAcharacters::HP()
{
	return this->Hp;
}

unsigned int FAcharacters::ST()
{
	return this->St;
}

double FAcharacters::Speed()
{
	return this->speed;
}

/* FAweapon */

FAweapon::FAweapon()
{
	this->att = 0;
	this->disp = 0;
	this->Name = "";
	this->range = 0;
	this->speed_re = 0;
}

FAweapon::FAweapon(string name, double Attack, double range_, double dispersion, double speed_rest, hgeSprite *Sprite, FAcharge *Char)
{
	this->Name = name;
	this->att = Attack;
	this->range = range_;
	this->disp = dispersion;
	this->speed_re = speed_rest;
	
	this->Weap_Sprite = Sprite;
	this->Charge = Char;
}

void FAweapon::SetAttack(double Attack)
{
	this->att = Attack;
}

void FAweapon::SetDisp(double dispersion)
{
	this->disp = dispersion;
}

void FAweapon::SetName(string name)
{
	this->Name = name;
}

void FAweapon::SetProperties(string name, double Attack, double range_, double dispersion, double speed_rest)
{
	this->Name = name;
	this->att = Attack;
	this->range = range_;
	this->disp = dispersion;
	this->speed_re = speed_rest;
}

void FAweapon::SetRange(double range_)
{
	this->range = range_;
}

void FAweapon::SetSpeed_re(double speed_rest)
{
	this->speed_re = speed_rest;
}

string FAweapon::GetName()
{
	return this->Name;
}

double FAweapon::GetAttack()
{
	return this->att;
}

double FAweapon::GetDisp()
{
	return this->disp;
}

double FAweapon::GetRange()
{
	return this->range;
}

double FAweapon::GetSpeed()
{
	return this->speed_re;
}

void FAweapon::ChangeCharge(FAcharge *Ch)
{
	this->Charge = Ch;
}

/* FAcharge */

FAcharge::FAcharge()
{
	this->Att = 0;
	this->speed_sn = 0;
	this->Name = "";
}

FAcharge::FAcharge(string name, double Attack, double speed_sn, hgeSprite *Sprite)
{
	this->Name = name;
	this->Att = Attack;
	this->speed_sn = speed_sn;
	this->Charge_Sprite = Sprite;
}

void FAcharge::SetAttack(double attack)
{
	this->Att = attack;
}

void FAcharge::SetSpeed(double speed)
{
	this->speed_sn = speed;
}

void FAcharge::SetName(string name)
{
	this->Name = name;
}

string FAcharge::GetName()
{
	return this->Name;
}

double FAcharge::GetAttack()
{
	return this->Att;
}

double FAcharge::GetSpeed()
{
	return this->speed_sn;
}

/* FAbones */
FAbones::FAbones()
{
	this->ID = -1;
	this->StartPoint.SetXY(0, 0);
	this->EndPoint.SetXY(0, 0);
	this->Bone_Rect.SetRectangle(StartPoint, EndPoint);
}

FAbones::FAbones(int ID, FApoint StartPoint, FApoint EndPoint, hgeSprite *Sprite)
{
	this->ID = ID;
	this->StartPoint.SetXY(StartPoint.X(), StartPoint.Y());
	this->EndPoint.SetXY(EndPoint.X(), EndPoint.Y());
}